<?php
return [

    'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
    'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=www.zhituanbox.com;dbname=blog-test',
            'username' => 'liuyang',
            'password' => '1225034948',
            'charset' => 'utf8',
        ],
        'cache' => [
            'class' => 'yii\caching\FileCache',
        ],
        //图片压缩
        'image' => [
            'class' => 'yii\image\ImageDriver',
            'driver' => 'GD',// GD or Imagick
        ],
        'redis' => [
            'class' => 'yii\redis\Connection',
            'hostname' => '172.18.170.34',
            'port' => 6379,
            'database' => 3
        ],
        //数据缓存
        'cache01' => [
            'class' => 'yii\redis\Cache',
            'redis' => [
                'hostname' => '172.18.170.34',
                'port' => '6379',
                'database' => 1
            ]
        ],
        //其它数据缓存
        'cache02' => [
            'class' => 'yii\redis\Cache',
            'redis' => [
                'hostname' => '172.18.170.34',
                'port' => '6379',
                'database' => 2
            ]
        ],
    ],
];
